Skip to content

fix: recover viewer post-processing after duplicate scene mutations#228

Merged
Aymericr merged 1 commit intomainfrom
fix/223-postprocessing-rebuild-fallback
Apr 14, 2026
Merged

fix: recover viewer post-processing after duplicate scene mutations#228
Aymericr merged 1 commit intomainfrom
fix/223-postprocessing-rebuild-fallback

Conversation

@open-pascal
Copy link
Copy Markdown
Collaborator

@open-pascal open-pascal commented Apr 14, 2026

Summary

  • rebuild the WebGPU post-processing pipeline when project switches or retry bumps occur
  • track and clear retry timers explicitly so retries do not pile up
  • fall back to a plain renderer pass while post-processing is unavailable so the viewer keeps rendering

Why

Duplicating elements can mutate the scene graph in a way that trips the current post-processing pipeline. The existing retry path increments pipelineVersion, but the rebuild effect was not keyed off that state, so the pipeline never actually rebuilt. On top of that, when the pipeline was unavailable the render loop returned early, which could leave the viewer without a normal fallback render.

Fixes #223.

Verification

  • npx -y @biomejs/biome check packages/viewer/src/components/viewer/post-processing.tsx
  • npx -y react-doctor@latest . --verbose --diff (packages/viewer scored 99/100, warning-only)

@Aymericr Aymericr merged commit 3afa1ce into main Apr 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Crash/Error when duplicating elements

2 participants